import html from './footer.html'
import share from './share.js'
import commentBox from './commentBox.js'

export default {
  template: html,
  props: {
    'count': {
      type: Number,
      default: 0
    },
    'detail': {
      type: Object,
      default: null
    }
  },
  methods: {
    share: function () {
      share.show()
    },
    showCommentBox: function () {
      commentBox.show()
    },
    gotoReply: function () {
      if (this.detail) {
        this.go('pages/reply', {
          detail: this.detail
        })
      } else {
        this.go('pages/detail')
      }
    }
  }
}
